<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">
    <title>fixedScroll demo2</title>
    <link rel="stylesheet" href="style.css">
    <style>
        li {
            margin-bottom: 20px;
            height: 600px;
        }

        .fl {
            width: 78%;
            height: 100%;
            background-color: #efefef;
            border: 1px solid #dbdbdb;
        }

        .fr {
            width: 20%;
            height: 200px;
        }

        .box1 {
            background-color: #999;
            z-index: 1;
        }

        .box2 {
            background-color: #666;
            z-index: 2;
        }
		.ys{text-align: center}
		.ys a{padding: 10px;line-height: 30px;color: #393939;font-weight: 600}
    </style>
</head>

<body>
   <div class="ys">
    	<a href="index.html">演示1</a>
    	<a href="index2.html">演示2</a>
    	<a href="index3.html">演示3</a>
    	<a href="index4.html">演示4</a>
    </div>
    <div class="main">
        <div class="usage">
            <h3>使用方法:</h3>
            <pre>
// box1
$(".box1").fixedScroll({
    stickEndEl: $(".box2")
})

// box2
$(".box2").fixedScroll()
        </pre>
        </div>
        <div class="demo">
            <ul>
                <li>
                    <div class="fl"></div>
                    <div class="fr box1">.box1</div>
                </li>
                <li>
                    <div class="fl"></div>
                    <div class="fr box2">.box2</div>
                </li>
                <li>
                    <div class="fl"></div>
                </li>
            </ul>
        </div>
        <div class="foot"></div>
    </div>

    <script src="http://www.jq22.com/jquery/jquery-1.10.2.js"></script>
    <script src="fixedScroll.js"></script>
    <script>
        $(".box1").fixedScroll({
            stickEndEl: $(".box2")
        })

        $(".box2").fixedScroll()
    </script>
</body>

</html>